package Demo8;

public class ThreadDemo {
    public static void main(String[] args) {
        Consumer c = new Consumer();
        Producer p = new Producer();

        c.setName("消费者");
        p.setName("生产者");
        c.start();
        p.start();
    }
}
